//检查个人普通用户登录
function checkPassword(oForm) {
    //密码
    if($(oForm).find('#reset').val() == '' ||  $(oForm).find('#reset').val().length < 6  ){
        layerMsg('新密码不能为空!',2);
        $(oForm).find('#reset').focus();
        return false;
    }
    //确认密码
    if($(oForm).find('#reset_password').val()!=$(oForm).find('#reset').val()){
        layerMsg('确认密码必须和新密码一致!',2);
        $("#reset_password").focus();
        return false;
    }

    var queryString = $(oForm).serialize();
    $.ajax({
        url: '/mobile/personal/find_password3',
        dataType: "json",
        data: queryString,
        type: "POST",
        beforeSend: function () {
            $(oForm).find("input[type='submit']").val('请稍候...');
            $(oForm).find("input[type='submit']").attr('disabled', true);
        },
        success: function (data) {
            if(data.status == '0') {
                layerMsg(data.msg,1);
                location = '/mobile/personal/find_password4?username='+data.username;
            }else if(data.status == '1') {
                $(oForm).find("input[type='submit']").val('重置密码');
                $(oForm).find("input[type='submit']").removeAttr('disabled');
                layerMsg(data.msg,2);
            }else{
                $(oForm).find("input[type='submit']").val('重置密码');
                $(oForm).find("input[type='submit']").removeAttr('disabled');
                layerMsg('可能网络原因引起的错误！',2);
            }
        },
        error: function (data) {
            var msgErr='';
            var errors = $.parseJSON(data.responseText);
            $.each(errors, function(index, value) {
                msgErr += "<p style='line-height: .4rem; width: 100%'>"+ value+";</p>";
            });
            layerMsg(msgErr,2);
            $(oForm).find("input[type='submit']").val('保存');
            $(oForm).find("input[type='submit']").removeAttr('disabled');
        },
        complete: function () {
        }
    });
    return false;
}


//检查重置密码

